<?php
/**
 * 用户管理
 * @copyright (c) Seer All Rights Reserved
 */

require_once 'globals.php';

$Course_Student_Model = new Course_Student_Model();
$action = $_POST['action'];
$courseID = isset($_POST['course_id_select']) ? $_POST['course_id_select'] : '';
$courseName = isset($_POST['course_name']) ? $_POST['course_name'] : '';
$courseBatch = isset($_POST['course_batch_select']) ? $_POST['course_batch_select'] : '';

//显示在线报名用户(用户一览表检索)
if ($action == '' ) {
	$page = $_GET['pid'] ? $_GET['pid'] : '1';
	$pwd = '报名信息一览';
	$addUrl = $courseID ? "courseID={$courseID}&" : '';

	$condition=($courseBatch==9999)?"and course_batch=9999":"and course_batch!=9999";

	$signupNum = $Course_Student_Model->getSignsNum($courseID,$condition);
	$signups = $Course_Student_Model->getCourseSignupForAdmin( $page, $courseID,$condition);
	$pageurl =  pagination($usersNum, Option::get('admin_perpage_num'), $page, "signup_list.php?{$addUrl}pid=");
	include View::getView('header');
	require_once View::getView('course/signup_list');
	include View::getView('footer');View::output();
}